import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export default new VueRouter({
    base: '/dominate',
    mode: 'history',
    routes: [{
        path: '/login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import(/* webpackChunkName: "login" */ './pages/login.vue')
    }],
    linkActiveClass: 'active-link',
    linkExactActiveClass: 'exact-active-link',
    scrollBehavior (to, from, savedPosition) {
        if (savedPosition) {
            return savedPosition
        } else {
            return { x: 0, y: 0 }
        }
    },
    fallback: true
})
